package com.ldj.security.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created with IntelliJ IDEA.
 * User: Lv.Dongjie
 * Date: 2018/5/23
 * Time: 14:12
 * Description:
 */
@Controller
public class LoginController {

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public String loginPage() {
        return "login";
    }

    @RequestMapping(value = "/tologin", method = RequestMethod.POST)
    public String tologin() {
        System.out.println("home");
        return "redirect:home";
    }

    @RequestMapping(value = "/home")
    public String homePage() {
        return "home";
    }

    @RequestMapping(value = "/errorp")
    public String errorPage() {
        return "error";
    }



}
